<?php

namespace JLPay\Models\Openmerch\Query;

/**
 * 商户费率信息DTO
 */
class MerchFeeRateInfoDto
{
    protected string $feeCalcType = '';  // 费率计算类型
    protected string $minAmt = '';  // 最小金额
    protected string $maxAmt = '';  // 最大金额
    protected string $fixed = '';  // 固定值
    protected string $rate = '';  // 费率
    protected string $bottom = '';  // 底限
    protected string $top = '';  // 上限
    protected string $step = '';  // 步长
    protected string $baseAmount = '';  // 基础金额
    protected string $baseFee = '';  // 基础费用

    /**
     * 设置费率计算类型
     *
     * @param string $feeCalcType
     * @return self
     */
    public function setFeeCalcType(string $feeCalcType): self
    {
        $this->feeCalcType = $feeCalcType;
        return $this;
    }

    /**
     * 设置最小金额
     *
     * @param string $minAmt
     * @return self
     */
    public function setMinAmt(string $minAmt): self
    {
        $this->minAmt = $minAmt;
        return $this;
    }

    /**
     * 设置最大金额
     *
     * @param string $maxAmt
     * @return self
     */
    public function setMaxAmt(string $maxAmt): self
    {
        $this->maxAmt = $maxAmt;
        return $this;
    }

    /**
     * 设置固定值
     *
     * @param string $fixed
     * @return self
     */
    public function setFixed(string $fixed): self
    {
        $this->fixed = $fixed;
        return $this;
    }

    /**
     * 设置费率
     *
     * @param string $rate
     * @return self
     */
    public function setRate(string $rate): self
    {
        $this->rate = $rate;
        return $this;
    }

    /**
     * 设置底限
     *
     * @param string $bottom
     * @return self
     */
    public function setBottom(string $bottom): self
    {
        $this->bottom = $bottom;
        return $this;
    }

    /**
     * 设置上限
     *
     * @param string $top
     * @return self
     */
    public function setTop(string $top): self
    {
        $this->top = $top;
        return $this;
    }

    /**
     * 设置步长
     *
     * @param string $step
     * @return self
     */
    public function setStep(string $step): self
    {
        $this->step = $step;
        return $this;
    }

    /**
     * 设置基础金额
     *
     * @param string $baseAmount
     * @return self
     */
    public function setBaseAmount(string $baseAmount): self
    {
        $this->baseAmount = $baseAmount;
        return $this;
    }

    /**
     * 设置基础费用
     *
     * @param string $baseFee
     * @return self
     */
    public function setBaseFee(string $baseFee): self
    {
        $this->baseFee = $baseFee;
        return $this;
    }

    /**
     * 获取费率计算类型
     *
     * @return string
     */
    public function getFeeCalcType(): string
    {
        return $this->feeCalcType;
    }

    /**
     * 获取最小金额
     *
     * @return string
     */
    public function getMinAmt(): string
    {
        return $this->minAmt;
    }

    /**
     * 获取最大金额
     *
     * @return string
     */
    public function getMaxAmt(): string
    {
        return $this->maxAmt;
    }

    /**
     * 获取固定值
     *
     * @return string
     */
    public function getFixed(): string
    {
        return $this->fixed;
    }

    /**
     * 获取费率
     *
     * @return string
     */
    public function getRate(): string
    {
        return $this->rate;
    }

    /**
     * 获取底限
     *
     * @return string
     */
    public function getBottom(): string
    {
        return $this->bottom;
    }

    /**
     * 获取上限
     *
     * @return string
     */
    public function getTop(): string
    {
        return $this->top;
    }

    /**
     * 获取步长
     *
     * @return string
     */
    public function getStep(): string
    {
        return $this->step;
    }

    /**
     * 获取基础金额
     *
     * @return string
     */
    public function getBaseAmount(): string
    {
        return $this->baseAmount;
    }

    /**
     * 获取基础费用
     *
     * @return string
     */
    public function getBaseFee(): string
    {
        return $this->baseFee;
    }

    /**
     * 转换为数组
     *
     * @return array
     */
    public function toArray(): array
    {
        return [
            'fee_calc_type' => $this->feeCalcType,
            'min_amt' => $this->minAmt,
            'max_amt' => $this->maxAmt,
            'fixed' => $this->fixed,
            'rate' => $this->rate,
            'bottom' => $this->bottom,
            'top' => $this->top,
            'step' => $this->step,
            'base_amount' => $this->baseAmount,
            'base_fee' => $this->baseFee,
        ];
    }
} 